use core::dependency::SerializedDependency;
use util::{CargoResult, graph};
use rustc_serialize::{Encoder,Encodable};
-use core::source::{SourceId, Source};
+use core::source::Source;
/// Informations about a package that is available somewhere in the file system.
///
manifest: Manifest,
// The root of the package
manifest_path: PathBuf,
- // Where this package came from
- source_id: SourceId,
}
#[derive(RustcEncodable)]
impl Package {
pub fn new(manifest: Manifest,
- manifest_path: &Path,
- source_id: &SourceId) -> Package {
+ manifest_path: &Path) -> Package {
Package {
manifest: manifest,
manifest_path: manifest_path.to_path_buf(),
- source_id: source_id.clone(),
}
}
use core::{Summary, Package, PackageId, Registry, Dependency};
use sources::{PathSource, GitSource, RegistrySource};
use sources::git;
-use util::{human, Config, CargoResult, CargoError, ToUrl};
+use util::{human, Config, CargoResult, ToUrl};
/// A Source finds and downloads remote packages based on names and
/// versions.
Rev(String),
}
-type Error = Box<CargoError + Send>;
-
/// Unique identifier for a source of packages.
#[derive(Clone, Eq, Debug)]
pub struct SourceId {
});
let mut new_manifest = pkg.manifest().clone();
new_manifest.set_summary(new_summary.override_id(new_pkgid));
- let new_pkg = Package::new(new_manifest, &manifest_path, &new_src);
+ let new_pkg = Package::new(new_manifest, &manifest_path);
// Now that we've rewritten all our path dependencies, compile it!
try!(ops::compile_pkg(&new_pkg, None, &ops::CompileOptions {
let (manifest, nested) =
try!(read_manifest(&data, layout, source_id, config));
- Ok((Package::new(manifest, path, source_id), nested))
+ Ok((Package::new(manifest, path), nested))
}
pub fn read_packages(path: &Path, source_id: &SourceId, config: &Config)